#define _CRT_SECURE_NO_WARNINGS 1
#include<bits/stdc++.h>
using namespace std;
const int N = 1010;
int x[N], y[N];
int main()
{
	int t;
	cin >> t;
	while (t--)
	{
		int n, m, k;
		cin >> n >> m >> k;
		for (int i = 1; i <= k + 1; i++)
			cin >> x[i] >> y[i];
		int f = 0;
		for (int i = 2; i <= k + 1; i++)
		{
			if ((abs(x[1] - x[i]) + abs(y[1] - y[i])) % 2 == 0)
			{
				f = 1;
				break;
			}
		}
		if (f)
			cout << "NO" << endl;
		else
			cout << "YES" << endl;
	}
	return 0;
}